/*
 * Galaxium Messenger
 * 
 * Copyright (C) 2005-2007 Philippe Durand <draekz@gmail.com>
 * 
 * License: GNU General Public License (GPL)
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Security.Cryptography;

using Galaxium.Core;


namespace Galaxium.Protocol.Yahoo
{
	public sealed class YahooSession : AbstractSession
	{
		private bool _disposed;
		private ContactCollection _contacts;
		private GroupCollection _groups;
		
		public GroupCollection GroupCollection
		{
			get { return this._groups; }
		}

		public override ContactCollection ContactCollection
		{
			get { return this._contacts; }
		}
		
		public YahooSession (YahooAccount account) : base (account)
		{
			
		}
		
		protected override void Dispose (bool disposing)
		{
			//if (!_disposed)
				//if (disposing && _connection != null)
					//_connection.Dispose ();
			
			_disposed = true;
		}
		
		public override void Connect ()
		{
			
			OnConnected (new SessionEventArgs (this));
		}

		public override void Disconnect ()
		{
			
			OnDisconnected (new SessionEventArgs (this));
		}
		
		public override IFileTransfer SendFile (IContact contact, string fileName)
		{
			ThrowUtility.ThrowIfNull ("contact", contact);
			ThrowUtility.ThrowIfEmpty ("fileName", fileName);
			
			return null;
		}
		
		public override void SetPresence (BasePresence presence)
		{
			//TODO: This is called when we set the status with the tray icon
			// it needs to find the correct IPresence object & set it
		}
	}
}